Round Rectangles

In the following routines, ovalWidth and ovalHeight specify the diameters of curvature for the corners.

__________________________________________
FrameRoundRect  *399*

Input names:   r, ovalWidth, ovalHeight

Input types:   Rect, integer, integer

Description:   Draws an outline just inside the specified rounded-corner rectangle, using the current grafPort’s pen pattern, mode, and size. 

__________________________________________
PaintRoundRect  *399*

Input names:   r, ovalWidth, ovalHeight 

Input types:   Rect, integer, integer

Description:   Paints the specified rounded-corner rectangle with the current grafPort’s pen pattern and mode.

__________________________________________
EraseRoundRect  *399*

Input names:   r, ovalWidth, ovalHeight 

Input types:   Rect, integer, integer

Description:   Paints the specified rounded-corner rectangle with the current grafPort’s background pattern bkPat.

__________________________________________
InvertRoundRect  *399*

Input names:   r, ovalWidth, ovalHeight 

Input types:   Rect, integer, integer

Description:   Inverts the pixels enclosed by the specified rounded-corner rectangle:    every white pixel becomes black and every black pixel becomes white.

__________________________________________
FillRoundRect  *399*

Input names:   r, ovalWidth, ovalHeight, pat 

Input types:   Rect, integer, integer, Pattern

Description:   Fills the specified rounded-corner rectangle with the given pattern.

__________________________________________
Arcs and Wedges

In the following routines, startAngle indicates where the arc begins and is treated MOD 360.  ArcAngle defines the extent of the arc.

__________________________________________
FrameArc  *400*

Input names:   aRect, startAngle, arcAngle 

Input types:   Rect, integer, integer

Description:   Draws an arc of the oval that fits inside the specified rectangle using the current grafPort’s pen pattern, mode, and size.  

__________________________________________
PaintArc  *400*

Input names:   r, startAngle, arcAngle 

Input types:   Rect, integer, integer

Description:   Paints a wedge of the oval just inside the specified rectangle with the current grafPort’s pen pattern and mode. 

__________________________________________
EraseArc  *400*

Input names:   r, startAngle, arcAngle 

Input types:   Rect, integer, integer

Description:   Paints a wedge of the oval just inside the specified rectangle with the current grafPort’s background pattern bkPat.

__________________________________________
InvertArc  *400*

Input names:   r, startAngle, arcAngle 

Input types:   Rect, integer, integer

Description:   Inverts the pixels enclosed by a wedge of the oval just inside the specified rectangle:    every white pixel becomes black and every black pixel becomes white.

__________________________________________
FillArc  *401*

Input names:   r, startAngle, arcAngle, pat 

Input types:   Rect, integer, integer, Pattern

Description:   Fills a wedge of the oval just inside the specified rectangle with the given pattern.

__________________________________________
Bit Transfer 

__________________________________________
ScrollRect  *401*

Input names:   r, dh, dv, updateRgn 

Input types:   Rect, integer, integer, RgnHandle

Description:   Shifts the bits that are inside the intersection of the specified rectangle.  The bits are shifted a distance of dh horizontally and dv vertically. The bits that are shifted out of the scroll area are lost, they are neither placed outside the area nor saved.  The space created by the scroll is filled with the grafPort’s background pattern and the updateRgn is changed to this filled area.  ScrollRect doesn’t change the coordinate system of the grafPort, it simply moves the entire document to different coordinates. 

__________________________________________
CopyBits  *401*

Input names:   srcBits, dstBits, srcRect, dstRect, mode, maskRgn 

Input types:   Bitmap, Bitmap, Rect, Rect, integer, RgnHandle

Description:   CopyBits transfers a bit image between any two bit maps or pixel maps and clips the result to the area specified by the maskRgn parameter.  The transfer may be performed in any of the eight source transfer modes.  The source rectangle is completely aligned with the destination rectangle; if the rectangles are of different sizes, the bit image is expanded or shrunk as necessary to fit the destination rectangle.

 You can use the following constants to specify the source transfer mode. (For more information, see Inside Macintosh.) 

constant
value 

srcCopy
0

srcOr
1

srcXor
2

srcBic
3

notsrcCopy
4

notsrcOr
5

notsrcXor
6

notsrcBic
7

__________________________________________
Pictures 

__________________________________________
OpenPicture  *402*

Input names:   picFrame 

Input types:   Rect

Output names:   PicHandle

Output types:   PicHandle

Description:   Returns a handle to a new picture that has the given rectangle as its picture frame, and tells QuickDraw to start saving as the picture definition all calls to drawing routines and all picture comments (if any). 

__________________________________________
ClosePicture  *402*

Description:   Tells QuickDraw to stop saving routine calls and picture comments as the definition of the currently open picture.  Only one ClosePicture should be performed for every OpenPicture. 

__________________________________________
PicComment  *403*

Input names:   kind, dataSize, dataHandle 

Input types:   integer, integer, Handle

Description:   Inserts the specified comment into the definition of the currently open picture. DataHandle is a handle to additional data if desired, and dataSize is the size of that data in bytes.  The kind parameter identifies the type of comment.
 You can use the following constants to specify the kind parameter.  (For more information, see Inside Macintosh.)

constant value 

picLParen
0

picRParen
1

__________________________________________
DrawPicture  *403*

Input names:   myPicture, dstRect 

Input types:   PicHandle, Rect

Description:   Takes the part of the given picture that’s inside the picture frame and draws it in dstRect, expanding or shrinking it as necessary to align the borders of the picture frame with dstRect.

__________________________________________
KillPicture  *403*

Input names:   myPicture

Input types:   PicHandle

Description:   Releases the memory occupied by the given picture.

__________________________________________
GetPicture  *404*

Input names:   picID 

Input types:   integer 

Output names:   PicHandle

Output types:   PicHandle 

Description:   Returns a handle to the picture having the given resource ID, reading it from the resource file, if necessary.  If the resource can’t be read, GetPicture returns NIL.